//
//  RecordCell.swift
//  MMTest
//
//  Created by liujianlong on 2022/9/20.
//

import UIKit

class RecordCell: UITableViewCell {
    @IBOutlet var time: UILabel!
    @IBOutlet var start: UILabel!
    @IBOutlet var end: UILabel!
    @IBOutlet var name: UILabel!
    @IBOutlet var btn: UIButton!
    var block:(()->Void)?
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    @IBAction func actionForBtn(_ sender: UIButton) {
        self.block?()
    }
    
    var model = Record(){
        didSet{
            let array =  model.startTime.components(separatedBy: " ")
            let array2 =  model.endTime.components(separatedBy: " ")
            self.time.text = array.first
            self.start.text = "开始时间: " + array.last!
            self.end.text = "结束时间: " + array2.last!
            self.name.text = "测试人: " + model.tester
            
            self.contentView.borderHexColor = self.model.noUpload ? "#FB5620" : "#999999"

        }
    }
}
